package com.ruoyi.stock.mapper;

import com.ruoyi.stock.domain.StockInventory;
import com.ruoyi.stock.domain.vo.WarehouseInStockVo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * @Author: YwaiX
 * @Version: 1.0
 * @Date: Created in 2024-10-30 16:37:02
 * @Description:
 */
public interface WarehouseInStockMapper {

    /**
     * 查询入库详情的详细信息
     *
     * @param warehouseInInfoId
     * @param goodsType
     * @return
     */
    WarehouseInStockVo list(@Param("warehouseInInfoId") Integer warehouseInInfoId,@Param("goodsType") Integer goodsType);

    /**
     * 修改入库id
     * @param warehouseInInfoId
     * @param warehouseId
     * @return
     */
    Integer updateWarehouseId(@Param("warehouseInInfoId") Integer warehouseInInfoId,@Param("warehouseId") Integer warehouseId);

    /**
     * 添加库存
     * @param warehouseId
     * @param goodsNo
     * @param number
     * @param creatorId
     * @param createdTime
     */
    void insertInventory(@Param("warehouseId") Integer warehouseId,@Param("goodsNo") String goodsNo,@Param("number") Integer number,@Param("creatorId") Long creatorId,@Param("createdTime") Date createdTime);

    /**
     * 修改库存
     * @param warehouseId
     * @param goodsNo
     * @param number
     * @param creatorId
     * @param createdTime
     */
    void updateInventory(@Param("warehouseId") Integer warehouseId,@Param("goodsNo") String goodsNo,@Param("number") Integer number,@Param("creatorId") Long creatorId,@Param("createdTime") Date createdTime);

    /**
     * 查询库存表
     * @param warehouseId
     * @param goodsNo
     * @return
     */
    List<StockInventory> selectInventory(@Param("warehouseId") Integer warehouseId, @Param("goodsNo") String goodsNo);

    /**
     * 修改入库状态
     *
     * @param warehouseInId
     * @param userId
     * @param nowDate
     * @return
     */
    Integer updateWarehouseStatus(@Param("warehouseInId") Integer warehouseInId,@Param("userId") Long userId,@Param("warehouseInDate") Date nowDate);
}
